Skip to content

Conversation

@Andarist
Copy link
Contributor

closes #21760

Even though keyof SomeMap[T] is deferred and generic, the actual possible keys are known as long as SomeMap is not generic itself. Such SomeMap has a "closed shape" so it feels it's safe to get a lower bound of that type as its constraint.

…lied to indexed access types with non-generic root object type
@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Sep 28, 2024
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those date to #52399 and #53059 (that was later reverted by #54845 ). The original intention was for those not to be errors. This is issue was essentially a duplicate of the one I'm fixing here ( #21760 ). So it makes sense that those errors are gone - as long as my proposed fix is correct.

@Andarist Andarist marked this pull request as draft September 28, 2024 14:53
@Andarist Andarist closed this Sep 28, 2024
@sandersn sandersn removed this from PR Backlog Apr 22, 2025
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Type cannot be used to index type after two indexes

2 participants